//
//  HomeEsView.m
//  NavZe
//
//  Created by ZengYuan on 15/8/12.
//  Copyright (c) 2015年 ZengYuan. All rights reserved.
//

#import "HomeEsView.h"
#import "Config.h"

@implementation HomeEsView

-(void)initBaseWork{
    self.userInteractionEnabled=YES;
    viewSize=self.frame;
    
    scrollView=[[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, viewSize.size.width, viewSize.size.height-27)];
    scrollView.pagingEnabled = YES;
    scrollView.showsHorizontalScrollIndicator = NO;
    scrollView.showsVerticalScrollIndicator = NO;
    scrollView.scrollsToTop = NO;
    scrollView.delegate = self;
    [self addSubview:scrollView];
    
    //说明文字层
    UIView *noteView=[[UIView alloc] initWithFrame:CGRectMake(0, viewSize.size.height-27,self.bounds.size.width,27)];
    [noteView setBackgroundColor:[UIColor clearColor]];
    
    float pagecontrolHeight=noteView.bounds.size.height;
    pageControl=[[UIPageControl alloc]initWithFrame:CGRectMake(noteView.bounds.size.width - 100,0, 100, pagecontrolHeight)];
    pageControl.currentPage=0;
    pageControl.hidden=YES;
    [noteView addSubview:pageControl];
    
    
    noteTitle=[[UILabel alloc] initWithFrame:
               CGRectMake(5,
                          0, kScreenWidth, noteView.bounds.size.height)];
    [noteTitle setBackgroundColor:[UIColor clearColor]];
    [noteView addSubview:noteTitle];
    noteTitle.textColor = [UIColor blackColor];
    noteTitle.font = [UIFont systemFontOfSize:14];
    [self addSubview:noteView];
    
    
    UIButton *button=[UIButton buttonWithType:UIButtonTypeCustom];
    button.frame=noteView.frame;
    [self addSubview:button];
    [button addTarget:self action:@selector(action:) forControlEvents:UIControlEventTouchUpInside];
    
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
